exports.reduceCoinsApi = function (session, uid, coins) {
    let self = this;
    return new Promise((resolve, reject) => {
        self.app.rpc.login.loginRemote.reduceCoins(session, uid, session.frontendId, coins, function (err, msg) {
            if (err) return reject(err);
            resolve();
        });
    });
}

exports.addCoinsApi = function (session, uid, coins) {
    let self = this;
    return new Promise((resolve, reject) => {
        self.app.rpc.login.loginRemote.addCoins(session, uid, session.frontendId, coins, true,function (err, msg) {
            if (err) return reject(err);
            resolve();
        });
    });
}